<!DOCTYPE html>
<html lang="en">

<!-- Head tag -->
<head><meta name="generator" content="Hexo 3.9.0">

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!--Description-->
    
        <meta name="description" content="python实现网络多人聊天室文件结构：
　　chatroom　　├── client.py  # 客户端代码　　├── language.py  # 语言文件　　├── server.py  # 服务端代码　　└── settings.py  # 设置文件
　　0 directories, 4 f">
    

    <!--Author-->
    
        <meta name="author" content="ck">
    

    <!--Open Graph Title-->
    
        <meta property="og:title" content="Pthon实现多人聊天室">
    

    <!--Open Graph Description-->
    

    <!--Open Graph Site Name-->
    <meta property="og:site_name" content="CK&#39;s blogs">

    <!--Type page-->
    
        <meta property="og:type" content="article">
    

    <!--Page Cover-->
    

    <meta name="twitter:card" content="summary">
    

    <!-- Title -->
    
    <title>Pthon实现多人聊天室 - CK&#39;s blogs</title>

    <!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" integrity="sha384-y3tfxAZXuh4HwSYylfB+J125MxIs6mR5FOHamPBG064zB+AFeWH94NdvaCBm8qnd" crossorigin="anonymous">

    <!-- Custom Fonts -->
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="//oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- Gallery -->
    <link href="//cdnjs.cloudflare.com/ajax/libs/featherlight/1.3.5/featherlight.min.css" type="text/css" rel="stylesheet">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="/blog/css/style.css">

    <!-- Google Analytics -->
    


</head>


<body>

<div class="bg-gradient"></div>
<div class="bg-pattern"></div>

<!-- Menu -->
<!--Menu Links and Overlay-->
<div class="menu-bg">
    <div class="menu-container">
        <ul>
            
            <li class="menu-item">
                <a href="/blog/">
                    Home
                </a>
            </li>
            
            <li class="menu-item">
                <a href="/blog/archives">
                    Archives
                </a>
            </li>
            
            <li class="menu-item">
                <a href="/blog/2019/09/04/本人简历/">
                    About
                </a>
            </li>
            
            <li class="menu-item">
                <a href="/blog/tags">
                    Tags
                </a>
            </li>
            
            <li class="menu-item">
                <a href="/blog/categories">
                    Categories
                </a>
            </li>
            
            <li class="menu-item">
                <a href="/blog/contact.html">
                    Contact
                </a>
            </li>
            
        </ul>
    </div>
</div>

<!--Hamburger Icon-->
<nav>
    <a href="#menu"></a>
</nav>

<div class="container">

    <!-- Main Content -->
    <div class="row">
    <div class="col-sm-12">

        <!--Title and Logo-->
        <header>
    <div class="logo">
        <a href="/blog/"><i class="logo-icon fa fa-cube" aria-hidden="true"></i></a>
        
    </div>
</header>

        <section class="main">
            
<div class="post">

    <div class="post-header">
        <h1 class="title">
            <a href="/blog/2019/09/08/Pthon实现多人聊天室/">
                Pthon实现多人聊天室
            </a>
        </h1>
        <div class="post-info">
            
                <span class="date">2019-09-08</span>
            
            
            
        </div>
    </div>

    <div class="content">

        <!-- Gallery -->
        

        <!-- Post Content -->
        <h1 id="python实现网络多人聊天室"><a href="#python实现网络多人聊天室" class="headerlink" title="python实现网络多人聊天室"></a>python实现网络多人聊天室</h1><p><strong>文件结构：</strong></p>
<p>　　chatroom<br>　　├── client.py  # 客户端代码<br>　　├── language.py  # 语言文件<br>　　├── server.py  # 服务端代码<br>　　└── settings.py  # 设置文件</p>
<p>　　0 directories, 4 files</p>
<p><strong>使用模块：</strong></p>
<ul>
<li>os</li>
<li>sys</li>
<li>socket</li>
<li>select</li>
</ul>
<p><strong>思路：</strong></p>
<ul>
<li>settings.py，定义HOST、PORT、ADDR、buffersize、language、curuser等变量。</li>
<li>server.py，服务器代码，使用select模块select方法实现IO多路复用监听sys.stdin输入以及客户端连接，实现与客户端通信，将从客户端接收到的信息群发给每个客户端。</li>
<li>client.py，客户端代码，同样使用IO多路复用同时监听客户端接收信息以及sys.stdin输入信息，实现与服务端的通信，间接实现与其他客户端的群聊。</li>
<li>language.py，语言文件，支持中文以及英语。</li>
</ul>
<p><strong>代码：</strong></p>
<p><strong>*settings.py*</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"># settings.py</span><br><span class="line"></span><br><span class="line">HOST = &apos;0.0.0.0&apos;      # 主机名</span><br><span class="line">PORT = 5555            # 端口号</span><br><span class="line">buffersize = 1024    # 缓冲大小</span><br><span class="line">ADDR = HOST, PORT    # 地址</span><br><span class="line"></span><br><span class="line">languages = [&apos;cn&apos;, &apos;en&apos;]      # &apos;cn&apos; -&gt; 中文</span><br><span class="line">language = &apos;cn&apos;                # &apos;en&apos; -&gt; 英文</span><br><span class="line"></span><br><span class="line">curuser = &apos;&apos;  # 当前用户</span><br></pre></td></tr></table></figure>

<p><strong>*language.py*</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"># language.py</span><br><span class="line"></span><br><span class="line">from settings import language</span><br><span class="line"></span><br><span class="line">if language == &apos;en&apos;:</span><br><span class="line">    administrator = &apos;Administrator&apos;</span><br><span class="line">    txt_administrator_close_chatroom = &apos;Chatroom closed by Administrator.&apos;</span><br><span class="line">    txt_uesr_enter_chatroom = &apos;entered the chatroom.&apos;</span><br><span class="line">    txt_user_quit_chatroom = &apos;quited the chatroom.&apos;</span><br><span class="line">    txt_username = &apos;username&gt; &apos;</span><br><span class="line">    txt_user_already_exists = &apos;Username already exists!&apos;</span><br><span class="line">    txt_connect_to = &apos;Connected to&apos;</span><br><span class="line">    txt_connect_from = &apos;Connected from&apos;</span><br><span class="line">elif language == &apos;cn&apos;:</span><br><span class="line">    administrator = &apos;管理员&apos;</span><br><span class="line">    txt_administrator_close_chatroom = &apos;管理员关闭了聊天室。&apos;</span><br><span class="line">    txt_uesr_enter_chatroom = &apos;进入了聊天室。&apos;</span><br><span class="line">    txt_user_quit_chatroom = &apos;退出了聊天室。&apos;</span><br><span class="line">    txt_username = &apos;用户名&gt; &apos;</span><br><span class="line">    txt_user_already_exists = &apos;用户名已存在。&apos;</span><br><span class="line">    txt_connect_to = &apos;连接到&apos;</span><br><span class="line">    txt_connect_from = &apos;连接从&apos;</span><br></pre></td></tr></table></figure>

<p><strong>*server.py*</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br></pre></td><td class="code"><pre><span class="line"># server.py</span><br><span class="line"></span><br><span class="line"># 导入系统模块</span><br><span class="line">import os, sys</span><br><span class="line"># 导入网络编程（传输层）模块</span><br><span class="line">from socket import *</span><br><span class="line"># IO多路复用模块</span><br><span class="line">from select import select</span><br><span class="line"># 设置模块</span><br><span class="line">from settings import *</span><br><span class="line"># 语言模块</span><br><span class="line">from language import *</span><br><span class="line"></span><br><span class="line">def main():</span><br><span class="line">    &apos;main 主函数&apos;</span><br><span class="line">    server = socket(AF_INET, SOCK_STREAM)  # 建立TCP套接字</span><br><span class="line">    server.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)  # 设置端口可立即重用</span><br><span class="line">    server.bind(ADDR)  # 绑定地址</span><br><span class="line">    server.listen()  # 监听</span><br><span class="line"></span><br><span class="line">    # 接收函数</span><br><span class="line">    accept(server)</span><br><span class="line"></span><br><span class="line">def accept(server):</span><br><span class="line">    &apos;accept 服务器接受函数&apos;</span><br><span class="line"></span><br><span class="line">    # 使用select模块的select方法实现IO多路复用监听传输</span><br><span class="line">    rlist = [server, sys.stdin]</span><br><span class="line">    wlist = []</span><br><span class="line">    xlist = []</span><br><span class="line"></span><br><span class="line">    while True:</span><br><span class="line">        rs, ws, xs = select(rlist, wlist, xlist)</span><br><span class="line"></span><br><span class="line">        for r in rs:</span><br><span class="line">            if r is server:</span><br><span class="line">                # 服务器接受客户端连接</span><br><span class="line">                conn, addr = server.accept()</span><br><span class="line">                # 调用validate函数检查用户名</span><br><span class="line">                if validate(conn):</span><br><span class="line">                    # 将客户端套接字添加到rlist中以监听</span><br><span class="line">                    rlist.append(conn)</span><br><span class="line">                    # 如果用户名注册成功</span><br><span class="line">                    print(txt_connect_from, addr)</span><br><span class="line">                else:</span><br><span class="line">                    conn.close()</span><br><span class="line">            elif r is sys.stdin:</span><br><span class="line">                # 服务器向所有客户端发送系统（管理员）消息</span><br><span class="line">                data = sys.stdin.readline()</span><br><span class="line">                if data == &apos;\n&apos;:</span><br><span class="line">                    # 如果服务器输入回车，则退出</span><br><span class="line">                    for c in rlist[2:]:</span><br><span class="line">                        c.send(b&apos;\n&apos;)</span><br><span class="line">                        c.close()</span><br><span class="line">                    server.close()</span><br><span class="line">                    print(txt_administrator_close_chatroom)</span><br><span class="line">                    os._exit(0)</span><br><span class="line">                else:</span><br><span class="line">                    # 如果服务器输入正常语句，通知所有客户端</span><br><span class="line">                    data = administrator + &apos;: &apos; + data</span><br><span class="line">                    for c in rlist[2:]:</span><br><span class="line">                        c.send(data.encode())</span><br><span class="line">            else:</span><br><span class="line">                # 服务器接受客户端的消息并转发给所有客户端</span><br><span class="line">                data = r.recv(buffersize)</span><br><span class="line">                if not data:</span><br><span class="line">                    # 关闭客户端</span><br><span class="line">                    r.close()</span><br><span class="line">                    rlist.remove(r)</span><br><span class="line">                else:</span><br><span class="line">                    # 转发信息给其他客户端</span><br><span class="line">                    print(data.decode(), end=&apos;&apos;)</span><br><span class="line">                    for c in rlist[2:]:</span><br><span class="line">                        if c is not r:</span><br><span class="line">                            c.send(data)</span><br><span class="line"></span><br><span class="line">def validate(client):</span><br><span class="line">    &apos;检验用户名 validate username&apos;</span><br><span class="line">    name = client.recv(buffersize).decode()</span><br><span class="line">    # print(name.decode())</span><br><span class="line">    # print(users)</span><br><span class="line">    if name in users:</span><br><span class="line">        client.send(b&apos;Username already exists!&apos;)</span><br><span class="line">        return False</span><br><span class="line">    else:</span><br><span class="line">        users.append(name)</span><br><span class="line">        client.send(b&apos;Welcome!&apos;)</span><br><span class="line">        return True</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">if __name__ == &apos;__main__&apos;:</span><br><span class="line">    # 全局变量，管理用户信息</span><br><span class="line">    users = []</span><br><span class="line"></span><br><span class="line">    # 主函数</span><br><span class="line">    main()</span><br></pre></td></tr></table></figure>

<p><strong>*client.py*</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br></pre></td><td class="code"><pre><span class="line"># client.py</span><br><span class="line"></span><br><span class="line"># 导入系统模块</span><br><span class="line">import os, sys</span><br><span class="line"># 导入网络编程（传输层）模块</span><br><span class="line">from socket import *</span><br><span class="line"># IO多路复用模块</span><br><span class="line">from select import select</span><br><span class="line"># 设置模块</span><br><span class="line">from settings import *</span><br><span class="line"># 语言模块</span><br><span class="line">from language import *</span><br><span class="line"></span><br><span class="line">def main():</span><br><span class="line">    &apos;main 主函数&apos;</span><br><span class="line">    client = socket(AF_INET, SOCK_STREAM)  # 建立TCP套接字</span><br><span class="line"></span><br><span class="line">    # 登录函数</span><br><span class="line">    if login(client):</span><br><span class="line">        # 连接函数</span><br><span class="line">        connect(client)</span><br><span class="line"></span><br><span class="line">def connect(client):</span><br><span class="line">    &apos;connect 客户端连接函数&apos;</span><br><span class="line"></span><br><span class="line">    # 使用select模块的select方法实现IO多路复用监听传输</span><br><span class="line">    rlist = [client, sys.stdin]</span><br><span class="line">    wlist = []</span><br><span class="line">    xlist = []</span><br><span class="line"></span><br><span class="line">    while True:</span><br><span class="line">        rs, ws, xs = select(rlist, wlist, xlist)</span><br><span class="line"></span><br><span class="line">        for r in rs:</span><br><span class="line">            if r is client:</span><br><span class="line">                # 接受服务器发来的消息</span><br><span class="line">                data = client.recv(buffersize)</span><br><span class="line">                if data.decode() == &apos;\n&apos;:</span><br><span class="line">                    # 如果消息为回车，聊天室关闭</span><br><span class="line">                    client.close()</span><br><span class="line">                    print(txt_administrator_close_chatroom)</span><br><span class="line">                    os._exit(0)</span><br><span class="line">                else:</span><br><span class="line">                    # 打印接收到的信息</span><br><span class="line">                    print(data.decode(), end=&apos;&apos;)</span><br><span class="line">            elif r is sys.stdin:</span><br><span class="line">                # 发送消息给服务器</span><br><span class="line">                data = sys.stdin.readline()</span><br><span class="line">                if data == &apos;\n&apos;:</span><br><span class="line">                    # 如果回车，发送退出消息，关闭客户端，退出聊天室</span><br><span class="line">                    data = curuser + &apos;: &apos; + txt_user_quit_chatroom + &apos;\n&apos;</span><br><span class="line">                    client.send(data.encode())</span><br><span class="line">                    client.close()</span><br><span class="line">                    os._exit(0)</span><br><span class="line">                else:</span><br><span class="line">                    # 发信息给服务器</span><br><span class="line">                    data = curuser + &apos;: &apos; + data</span><br><span class="line">                    client.send(data.encode())</span><br><span class="line"></span><br><span class="line">def login(client):</span><br><span class="line">    &apos;登录函数 login&apos;</span><br><span class="line">    # 使用全局变量管理用户</span><br><span class="line">    # 先让客户端输入姓名</span><br><span class="line">    global curuser</span><br><span class="line">    curuser = input(txt_username)</span><br><span class="line">    # 再连接到服务器，传送用户名以检验</span><br><span class="line">    client.connect(ADDR)  # 连接到服务器地址</span><br><span class="line">    print(txt_connect_to, ADDR)</span><br><span class="line">    client.send(curuser.encode())</span><br><span class="line">    data = client.recv(buffersize)</span><br><span class="line">    if data.decode() == &apos;Username already exists!&apos;:</span><br><span class="line">        # 如果用户名已经存在，要求重新输入</span><br><span class="line">        print(txt_user_already_exists)</span><br><span class="line">        return False</span><br><span class="line">    else:</span><br><span class="line">        # 发送信息给服务器，告知服务器用户进入聊天室</span><br><span class="line">        # -*- 因为监听传输的是sys.stdin.readline()，所以必须在最后添加换行符，以便清除阻塞 -*-</span><br><span class="line">        data = curuser + &apos;: &apos; + txt_uesr_enter_chatroom + &apos;\n&apos;</span><br><span class="line">        client.send(data.encode())</span><br><span class="line">        return True</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">if __name__ == &apos;__main__&apos;:</span><br><span class="line">    main()</span><br></pre></td></tr></table></figure>

<p><strong>运行截图：</strong></p>
 <img src="/blog/2019/09/08/Pthon实现多人聊天室/duo1.png">

<p><strong>总结：</strong></p>
<ul>
<li>在打代码之前，一定要先进行规划，大致写出项目的大概路线。</li>
<li>项目的实现要从最基本的地基开始，像这样一个网络间的多人聊天室的实现必须先从建立服务端和客户端开始，不能反而从表面入手。比如如果要做一个网络多人聊天室的图形化界面应用，绝对不可以先去写图形界面的实现，就算最后实现的图形界面多么好看，如果不能实现网络通信也白干。</li>
<li>对于项目中出错的点，应该多加注释，方便以后阅读，在网上查找到有益的知识，可以把网址复制下来，写进项目文档，方便以后不时之需。</li>
</ul>

    </div>

    

    
        <div class="post-tags">
            <i class="fa fa-tags" aria-hidden="true"></i>
            <a href="/blog/tags/python/">#python</a> <a href="/blog/tags/多人聊天室/">#多人聊天室</a>
        </div>
    

    <!-- Comments -->
    

</div>
        </section>

    </div>
</div>


</div>

<!-- Footer -->
<div class="push"></div>

<footer class="footer-content">
    <div class="container">
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 footer-about">
                <h2>About</h2>
                <p>
                    This theme was developed by <a href="https://github.com/klugjo">Jonathan Klughertz</a>. The source code is available on Github. Create Websites. Make Magic.
                </p>
            </div>
            
    <div class="col-xs-6 col-sm-6 col-md-3 col-lg-3 recent-posts">
        <h2>Recent Posts</h2>
        <ul>
            
            <li>
                <a class="footer-post" href="/blog/2019/10/25/tars框架环境基础搭建/">tars框架环境基础搭建</a>
            </li>
            
            <li>
                <a class="footer-post" href="/blog/2019/10/20/认识tars框架/">认识tars框架</a>
            </li>
            
            <li>
                <a class="footer-post" href="/blog/2019/10/05/redis数据迁移备份与恢复/">redis数据迁移备份与恢复</a>
            </li>
            
            <li>
                <a class="footer-post" href="/blog/2019/09/21/负载均衡的5种策略/">负载均衡的5种策略</a>
            </li>
            
        </ul>
    </div>



            
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                <ul class="list-inline footer-social-icons">
                    
                    <li class="list-inline-item">
                        <a href="https://github.com/klugjo/hexo-theme-alpha-dust">
                            <span class="footer-icon-container">
                                <i class="fa fa-github"></i>
                            </span>
                        </a>
                    </li>
                    
                    
                    <li class="list-inline-item">
                        <a href="https://twitter.com/?lang=en">
                            <span class="footer-icon-container">
                                <i class="fa fa-twitter"></i>
                            </span>
                        </a>
                    </li>
                    
                    
                    <li class="list-inline-item">
                        <a href="https://www.facebook.com/">
                            <span class="footer-icon-container">
                                <i class="fa fa-facebook"></i>
                            </span>
                        </a>
                    </li>
                    
                    
                    <li class="list-inline-item">
                        <a href="https://www.instagram.com/">
                            <span class="footer-icon-container">
                                <i class="fa fa-instagram"></i>
                            </span>
                        </a>
                    </li>
                    
                    
                    <li class="list-inline-item">
                        <a href="https://dribbble.com/">
                            <span class="footer-icon-container">
                                <i class="fa fa-dribbble"></i>
                            </span>
                        </a>
                    </li>
                    
                    
                    <li class="list-inline-item">
                        <a href="https://plus.google.com/">
                            <span class="footer-icon-container">
                                <i class="fa fa-google-plus"></i>
                            </span>
                        </a>
                    </li>
                    
                    
                    <li class="list-inline-item">
                        <a href="https://www.behance.net/">
                            <span class="footer-icon-container">
                                <i class="fa fa-behance"></i>
                            </span>
                        </a>
                    </li>
                    
                    
                    <li class="list-inline-item">
                        <a href="https://500px.com/">
                            <span class="footer-icon-container">
                                <i class="fa fa-500px"></i>
                            </span>
                        </a>
                    </li>
                    
                    
                    <li class="list-inline-item">
                        <a href="mailto:test@example.com">
                            <span class="footer-icon-container">
                                <i class="fa fa-envelope-o"></i>
                            </span>
                        </a>
                    </li>
                    
                    
                    <li class="list-inline-item">
                        <a href="\#">
                            <span class="footer-icon-container">
                                <i class="fa fa-rss"></i>
                            </span>
                        </a>
                    </li>
                    
                </ul>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                <div class="footer-copyright">
                    @Untitled. All right reserved | Design & Hexo <a href="http://www.codeblocq.com/">Jonathan Klughertz</a>
                </div>
            </div>
        </div>
    </div>
</footer>

<!-- After footer scripts -->

<!-- jQuery -->
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>

<!-- Tween Max -->
<script src="//cdnjs.cloudflare.com/ajax/libs/gsap/1.18.5/TweenMax.min.js"></script>

<!-- Gallery -->
<script src="//cdnjs.cloudflare.com/ajax/libs/featherlight/1.3.5/featherlight.min.js" type="text/javascript" charset="utf-8"></script>

<!-- Custom JavaScript -->
<script src="/blog/js/main.js"></script>

<!-- Disqus Comments -->



</body>

</html>